<template>
  <div v-loading="show_loading" element-loading-text="拼命加载中">
    <el-card class="box-card" shadow="never">
       <div style="height:400px;" id="main-charts">
       </div>
    </el-card>
  </div>
</template>

<script>
  // 引入 ECharts 主模块
  var echarts = require('echarts/lib/echarts');
  // 引入柱状图
  require('echarts/lib/chart/bar');
  // 引入提示框和标题组件
  require('echarts/lib/component/tooltip');
  require('echarts/lib/component/title');

  export default{
    name:"DataCenter",
    props:[ 'option','show_loading'],
    data(){
      return{
        myChart:''
      }
    },
    mounted(){
      this.myChart=echarts.init(document.getElementById('main-charts'));
      //myChart.setOption(this.option);
    },
    methods:{
      setChartOption(option){
        this.myChart.setOption(option,true);
      }
    }
  }
</script>

<style>
</style>
